#include <iostream>
#include <string>
#include "MeshFile.h"


using namespace std;

int main ()
{
	try {
		glow::MeshFile m("cube.off");

		const int s = m.getVerticesSize(), s2 = m.getFacesSize();
		float * buf;
		unsigned int * fbuf;
		buf = m.getVertices();
		fbuf = m.getFaces();
		int cpt = -1;
		for(int i = 0; i < m.getVerticesSize(); i++)
		{
			cpt = (cpt+1) %3;
			if(cpt == 0) cout << endl;
			cout << buf [i] << " ";
		}
		cpt = -1;
		for(int i = 0; i < m.getFacesSize(); i++)
		{
			cpt = (cpt+1) %4;
			if(cpt == 0) cout << endl;
			cout << fbuf[i];
		}
		cout << endl;
		
		
	}catch(string msg)
	{ cerr << msg << endl; }
	
	return 0;
}
